package com.noahplat.fence.mapper;

import com.noahplat.fence.pojo.Fence;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 功能：围栏Mapper
 * name:宋彦磊
 * time:2021.03.08
 */

public interface FenceMapper extends Mapper<Fence> {
    @Select("select f.id,f.acctid,f.point,f.radius,f.name,f.type,f.alarm,f.status,f.creattime,f.uid,f.apex,f.del from tb_fence f,tb_fencere r where f.id = r.fid and f.uid = #{uid} and f.del = 'N' and r.imei=#{imei}")
    List<Fence> getFence(@Param("imei") String imei,@Param("uid") Long uid);
}
